from likeshop_project.base.mybase import Tools
from likeshop_project.accountapi.login_api import login_model

class  Shopping_Cart_Selection_Status_model(Tools):
    path = '/api/cart/selected'
    def Shopping_Cart_Selection_Status_action(self,hb,cart_id,selected):
        mydata = {
            'cart_id':cart_id,
        'selected':selected
        }
        res = self.huihua.post(url=self.hosturl+self.path,data=mydata,headers=hb)
        return res.json()


if __name__ == '__main__':

    import requests
    s = requests.session()
    re = login_model(huihua=s)
    mag = re.login_action(account='17909898989',password='123wqewqrf')
    gettoken = mag['data'].get('token')
    hb = {'token':gettoken}
    re = Shopping_Cart_Selection_Status_model(huihua=s)
    msg =re.Shopping_Cart_Selection_Status_action(cart_id='294',selected='0',hb=hb)
    print(msg)